Skip to content

Conversation

@rabisse
Copy link
Contributor

Remember to include the following changes:

  • Ensure the PR title includes the name of the component you are changing so it's clear in the release notes for consumers of the changes in the version e.g [Clover-123][BpkButton] Updating the colour
  • README.md (If you have created a new component)
  • Component README.md
  • Tests
  • Accessibility tests
    • The following checks were performed:
      • Ability to navigate using a keyboard only
      • Zoom functionality (Deque University explanation):
        • The page SHOULD be functional AND readable when only the text is magnified to 200% of its initial size
        • Pages must reflow as zoom increases up to 400% so that content continues to be presented in only one column i.e. Content MUST NOT require scrolling in two directions (both vertically and horizontally)
      • Ability to navigate using a screen reader only
  • Storybook examples created/updated
  • For breaking changes or deprecating components/properties, migration guides added to the description of the PR. If the guide has large changes, consider creating a new Markdown page inside the component's docs folder and link it here

Copilot AI review requested due to automatic review settings September 27, 2025 03:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request enables physical scroll for row layouts in the BpkCardList component by modifying the carousel behavior to support native scrolling on all screen sizes instead of just mobile. The changes address an issue where programmatic navigation and manual scrolling could conflict, causing unwanted index reverts.

  • Fixed scroll lock mechanism and intersection observer conflicts during programmatic navigation
  • Enabled horizontal scrolling for all screen sizes instead of mobile-only
  • Added programmatic navigation state tracking to prevent visibility-based index updates during scrolling

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
BpkCardListCarousel.tsx Added programmatic navigation tracking logic and fixed useEffect dependency arrays to prevent scroll conflicts
BpkCardListCarousel.module.scss Moved overflow-x: scroll from mobile-only to all screen sizes and reorganized scroll-related CSS properties

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if (programmaticTargetIndexRef.current === currentIndex) {
programmaticTargetIndexRef.current = null;
}
} else if (programmaticTargetIndexRef.current == null) {
Copy link

Copilot AI Sep 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use strict equality (===) instead of loose equality (==) for null comparison to follow TypeScript best practices.

Suggested change
} else if (programmaticTargetIndexRef.current == null) {
} else if (programmaticTargetIndexRef.current === null) {

Copilot uses AI. Check for mistakes.
@rabisse Alex (rabisse) changed the title IRN-6178 BpkCardList Enable Physical Scroll For Row [IRN-6178] [BpkCardList] Enable Physical Scroll For Row Sep 27, 2025
@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/3974 to see this build running in a browser.

@skyscanner-backpack-bot
Copy link

skyscanner-backpack-bot bot commented Sep 27, 2025

Warnings
⚠️

Package source files (e.g. packages/package-name/src/Component.js) were updated, but snapshots weren't. Have you checked that the tests still pass?

Browser support

If this is a visual change, make sure you've tested it in multiple browsers.

Generated by 🚫 dangerJS against a35f025

clearTimeout(openSetStateLockTimeoutRef.current);
}
};
}, [root]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this necessary Alex (@rabisse) ?

@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/3974 to see this build running in a browser.

@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/3974 to see this build running in a browser.

1 similar comment
@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/3974 to see this build running in a browser.

@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/3974 to see this build running in a browser.

@jimmycook Jimmy cook (jimmycook) added the minor Non breaking change label Oct 13, 2025
@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/3974 to see this build running in a browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Non breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants